package com.geese.common.util;

import java.util.List;

import com.geese.common.vo.Paginator;
import com.github.pagehelper.Page;

public abstract class PageUtil {
	
	@SuppressWarnings("rawtypes")
	public static <T> Paginator<T>  getPage(List query, List<T> result) {
		if(query instanceof Page ) {
			return new Paginator<>((Page)query, result);
		}
		return null;
	}
	
	@SuppressWarnings("rawtypes")
	public static <T> Paginator<T>  getPage(List<T> query) {
		if(query instanceof Page ) {
			return new Paginator<T>((Page)query, query);
		}
		return null;
	}

}
